package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.MaintenanceConfigBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 保养配置表 Mapper 接口
 * </p>
 *
 * @author xuelin yi
 * @since 2019-09-23
 */
public interface MaintenanceConfigMapper extends RootMapper<MaintenanceConfigBean> {

    /**
     * 根据车型id查询保养配置
     *
     * @param vehicleId
     * @return
     */
    MaintenanceConfigBean getMaintenanceConfigByVehicleId(Integer vehicleId);

    /**
     * 修改
     *
     * @param bean
     * @return
     */
    int modifyById(MaintenanceConfigBean bean);


    /**
     * 根据条件分页查询count
     *
     * @param params
     * @return
     */
    long getPageCount(@Param("params") Map<String, Object> params);

    /**
     * 根据条件分页查询
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<MaintenanceConfigBean> getPage(@Param("params") Map<String, Object> params, @Param("pageNum") int pageNum,
                                        @Param("pageSize") int pageSize);

    List<Integer> getVehicleIdList();
}
